<?php

namespace Home\Controller;

use Admin\Controller\CommonController;
use Think\Controller;

class PaymentController extends CommoController
{
    public function Payment()
    {

        //  获取id

        $id = $_GET['id'];

        //  订单详细

        $model_goods = D('goods');
        $sql = sprintf("SELECT * FROM goods WHERE id = '%s'",$id);
        $good_es = $model_goods->query($sql);
        $this->assign('good_es', $good_es);

        //  推荐商品

        $good = $model_goods->query("SELECT * FROM goods  LIMIT 3");
        $this->assign('good', $good);

        //  友情链接

        $model_link = D('link');
        $links = $model_link->query("SELECT * FROM link");
        $this->assign('links', $links);

        $this->display();
    }

}